package com.etc.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.etc.dao.GoodsMapper;
import com.etc.entity.Goods;
import com.etc.service.GoodsService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

@Service
public class GoodsServiceImpl implements GoodsService {

	@Autowired
	private GoodsMapper mapper;

	@Override
	public Page<Goods> getByPage(int page, int limit, String keywords) {
		// TODO Auto-generated method stub
		PageHelper.startPage(page, limit);
		Page<Goods> pages = mapper.getByLike("%" + keywords + "%");
		return pages;
	}

}
